﻿namespace SyncFileCommon.Model
{
    public class SyncPlanModel
    {
        public long ID { get; set; } = 0;

        /// <summary>
        /// 服务器IP
        /// </summary>
        public string ServerIP { get; set; } = string.Empty;

        /// <summary>
        /// 服务器端口
        /// </summary>
        public int ServerPort { get; set; } = 0;

        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; } = string.Empty;

        /// <summary>
        /// 用户密码
        /// </summary>
        public string Password { get; set; } = string.Empty;

        /// <summary>
        /// 同步目录路径
        /// </summary>
        public string DirPath { get; set; } = string.Empty;

        /// <summary>
        /// 保存文件路径
        /// </summary>
        public string SaveDirPath { get; set; } = string.Empty;

        /// <summary>
        /// 同步计划开始时间
        /// </summary>
        public DateTime BeginTime { get; set; } = DateTime.MinValue;

        /// <summary>
        /// 同步计划结束时间
        /// </summary>
        public DateTime EndTime { get; set; } = DateTime.MinValue;

        /// <summary>
        /// 运行间隔类型 O，只执行一次 R，固定间隔循环执行  E，执行结束后间隔再执行
        /// </summary>
        public string RunType { get; set; } = string.Empty;

        /// <summary>
        /// 运行间隔时间(秒)
        /// </summary>
        public int IntervalTime { get; set; } = 0;

        /// <summary>
        /// 最后一次执行时间
        /// </summary>
        public DateTime LastRunTime { get; set; } = DateTime.MinValue;


        /// <summary>
        /// 是否正在运行
        /// </summary>
        public bool IsRun { get; set; } = false;

        /// <summary>
        /// 任务状态  1，启用  0，停止
        /// </summary>
        public int State { get; set; } = 0;

    }
}
